package extends01;

public class Person {
    private String name;

    public void setName(String name){  // 设置名字
        this.name=name;
    }
    public String getName(){   // 提取名字
        return name;
    }

    public void eat(){
        System.out.println(name+"吃饭");
    }
}

